package dotcom;

import java.util.ArrayList;

public class dotcom {
		
	
	private String name;
	private ArrayList<String>	locationcells;
	
	
	public void setname(String inputname)
	{
		name = inputname;
	}
	
	
	public void setlocationcells(ArrayList<String> loc)
	{
		locationcells = loc;
	}
	
	
	public String checkyourself(String userinput)
	{
		String result = "miss";
		
		int index = locationcells.indexOf(userinput);
		
		if(index>=0)
		{
			locationcells.remove(index);
			
			if(locationcells.isEmpty())
			{
				result = "kill";
			}
			else
			{
				result = "hit";	
			}
		}
		
		
		return result;
	}
	
	
	
}
